Skip to content

Conversation

samejr
Copy link
Member

@samejr samejr commented Sep 19, 2025

You can now more easily copy data from the Details tab on the run page:

  • Copy buttons on hover for task name, root/parent, version, batch, run id, internal id
  • Adds asChild to the CopyableText component to prevent illegal button in button markup
  • Improves the copy for consistency in some of the tooltips
tooltips.mp4

Copy link

changeset-bot bot commented Sep 19, 2025

⚠️ No Changeset found

Latest commit: cc75583

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

coderabbitai bot commented Sep 19, 2025

Walkthrough

  • CopyableText component now accepts an optional asChild boolean prop, forwards it to SimpleTooltip, and applies an extra "p-1" class to the copy button container when asChild is true.
  • Multiple identifiers across the Run and Span route view are wrapped with CopyableText for copy-to-clipboard behavior.
  • Tooltip texts are updated to “View [entity] filtered by …” and several tooltips have disableHoverableContent enabled.
  • Region flag icons render when region.location is available.
  • The Root & Parent run section is restructured to explicitly render Root run and Parent run entries, with IDs wrapped in CopyableText.
  • No data fetching or exported API changes beyond the CopyableText prop addition.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description gives a brief summary and an attachment but does not follow the repository's required template: it is missing the "Closes #" header, the checklist (including the contributing guide confirmation), a Testing section with verification steps, a Changelog entry, and the Screenshots section. Because multiple required template sections are absent or incomplete, the description does not meet the repository template. This deficiency prevents the description from passing the template check. Please update the PR description to include "Closes #" if applicable, complete the checklist items (confirm adherence to the contributing guide and that tests were run), add a Testing section describing the steps you used to verify the change, provide a short Changelog entry, and attach screenshots or state why none are necessary before requesting review.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Chore(webapp): adds more copy buttons" concisely and accurately describes the primary change in the changeset, which is adding copy buttons and minor CopyableText API/styling updates. It is short, focused, and relevant for a teammate scanning PR history. Minor stylistic improvements (capitalization/conventional-commit format) could be applied but do not affect the title's accuracy.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore(webapp)-more-copy-buttons

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
apps/webapp/app/components/primitives/CopyableText.tsx (2)

40-40: Consider more descriptive padding logic.

The asChild prop adds p-1 padding to the button. While this works, the prop name doesn't clearly convey that it affects padding. Consider either:

  1. Using a more descriptive prop name like compact or withInnerPadding
  2. Adding a comment explaining why asChild triggers padding
  3. Documenting this behavior in a prop comment

7-17: Add JSDoc documentation for the new prop.

Consider adding documentation to explain when and why to use the asChild prop, especially since it prevents illegal button-in-button markup (as mentioned in the PR objectives).

 export function CopyableText({
   value,
   copyValue,
   className,
   asChild,
 }: {
   value: string;
   copyValue?: string;
   className?: string;
+  /**
+   * When true, prevents button-in-button markup by rendering the tooltip
+   * as a child element and adds extra padding to the copy button.
+   * Use this when CopyableText is nested inside interactive elements like links.
+   */
   asChild?: boolean;
 }) {
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d17730 and cc75583.

📒 Files selected for processing (2)
  • apps/webapp/app/components/primitives/CopyableText.tsx (3 hunks)
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx (9 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

**/*.{ts,tsx}: Always prefer using isomorphic code like fetch, ReadableStream, etc. instead of Node.js specific code
For TypeScript, we usually use types over interfaces
Avoid enums
No default exports, use function declarations

Files:

  • apps/webapp/app/components/primitives/CopyableText.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx
{packages/core,apps/webapp}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

We use zod a lot in packages/core and in the webapp

Files:

  • apps/webapp/app/components/primitives/CopyableText.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx
apps/webapp/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

When importing from @trigger.dev/core in the webapp, never import the root package path; always use one of the documented subpath exports from @trigger.dev/core’s package.json

Files:

  • apps/webapp/app/components/primitives/CopyableText.tsx
  • apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx
🧬 Code graph analysis (1)
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx (2)
apps/webapp/app/components/primitives/CopyableText.tsx (1)
  • CopyableText (7-61)
apps/webapp/app/utils/pathBuilder.ts (2)
  • v3RunSpanPath (304-312)
  • v3RunRedirectPath (292-298)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (23)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (6)
apps/webapp/app/routes/resources.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam.spans.$spanParam/route.tsx (6)

427-431: LGTM! Consistent implementation of copy functionality.

Good use of the asChild prop here to prevent button-in-button markup when CopyableText is inside a link.


774-776: LGTM! Region icon rendering with location check.

Good defensive check ensuring region.location exists before rendering the FlagIcon.


434-435: Consistent tooltip text improvements.

The tooltip texts have been consistently updated to "View runs filtered by..." and "View batches filtered by..." which provides clearer user guidance. Good improvement for UX consistency.


439-476: Well-structured Root & Parent run section refactor.

The new implementation clearly distinguishes between:

  1. Combined "Root & Parent run" (when root is also the parent)
  2. Separate "Root run" and "Parent run" entries

This provides better clarity for users and maintains consistent copy functionality across all run IDs.


597-597: Good distinction between development and deployment versions.

The implementation correctly:

  • Shows plain copyable text for development environments
  • Shows a linked copyable version for deployment environments
    This maintains appropriate navigation while adding copy functionality.

Also applies to: 610-610


815-816: Approve — run.friendlyId and run.id are appropriate to copy

Verified: both identifiers are used widely (DB unique friendlyId, presenters, APIs, UI) and CopyableText is used for similar IDs elsewhere; no change required.

@ericallam ericallam merged commit 365adc2 into main Sep 19, 2025
31 checks passed
@ericallam ericallam deleted the chore(webapp)-more-copy-buttons branch September 19, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants